﻿<%@ page contentType="text/html" language="java"  errorPage="" pageEncoding="utf-8"%>
<%@ page import="com.zhufei.dao.*" %>
<%@ page import="com.zhufei.entity.*" %>
<%@ page import="java.util.ArrayList" %>


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html" />
<title>深圳市橄榄树助飞基金</title>
<link href="css/css.css" rel="stylesheet" type="text/css" />
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js" type="text/javascript"></script>
<script src="js/jquery.KinSlideshow-1.1.js" type="text/javascript"></script>
<script type="text/javascript">
$(function(){
	$("#KinSlideshow").KinSlideshow({
		mouseEvent:"mouseover",
		titleBar:{titleBar_height:30},
		btn:{btn_bgHoverColor:"#0c800e",btn_borderHoverColor:"#abffac" }
	});
})
</script>
 <script>
function Juge(theForm){
			 	 if(document.getElementById("username").value == "")
                 {
                      alert("用户名不能为空！")
                      document.getElementById("username").focus();
                      return false;
                  }
                if(document.getElementById("password").value == "")
                 {
                      alert("密码不能为空！")
                      document.getElementById("password").focus();
                      return false;
                  }
			 }
 </script>
<script language="javascript">
<!--
//图片滚动列表 mengjia 070927
var Speed_1 = 10; //速度(毫秒)
var Space_1 = 20; //每次移动(px)
var PageWidth_1 = 658; //翻页宽度
var interval_1 = 7000; //翻页间隔
var fill_1 = 0; //整体移位
var MoveLock_1 = false;
var MoveTimeObj_1;
var MoveWay_1="right";
var Comp_1 = 0;
var AutoPlayObj_1=null;
function GetObj(objName){if(document.getElementById){return eval('document.getElementById("'+objName+'")')}else{return eval('document.all.'+objName)}}
function AutoPlay_1(){clearInterval(AutoPlayObj_1);AutoPlayObj_1=setInterval('ISL_GoDown_1();ISL_StopDown_1();',interval_1)}
function ISL_GoUp_1(){if(MoveLock_1)return;clearInterval(AutoPlayObj_1);MoveLock_1=true;MoveWay_1="left";MoveTimeObj_1=setInterval('ISL_ScrUp_1();',Speed_1);}
function ISL_StopUp_1(){if(MoveWay_1 == "right"){return};clearInterval(MoveTimeObj_1);if((GetObj('ISL_Cont_1').scrollLeft-fill_1)%PageWidth_1!=0){Comp_1=fill_1-(GetObj('ISL_Cont_1').scrollLeft%PageWidth_1);CompScr_1()}else{MoveLock_1=false}
AutoPlay_1()}
function ISL_ScrUp_1(){if(GetObj('ISL_Cont_1').scrollLeft<=0){GetObj('ISL_Cont_1').scrollLeft=GetObj('ISL_Cont_1').scrollLeft+GetObj('List1_1').offsetWidth}
GetObj('ISL_Cont_1').scrollLeft-=Space_1}
function ISL_GoDown_1(){clearInterval(MoveTimeObj_1);if(MoveLock_1)return;clearInterval(AutoPlayObj_1);MoveLock_1=true;MoveWay_1="right";ISL_ScrDown_1();MoveTimeObj_1=setInterval('ISL_ScrDown_1()',Speed_1)}
function ISL_StopDown_1(){if(MoveWay_1 == "left"){return};clearInterval(MoveTimeObj_1);if(GetObj('ISL_Cont_1').scrollLeft%PageWidth_1-(fill_1>=0?fill_1:fill_1+1)!=0){Comp_1=PageWidth_1-GetObj('ISL_Cont_1').scrollLeft%PageWidth_1+fill_1;CompScr_1()}else{MoveLock_1=false}
AutoPlay_1()}
function ISL_ScrDown_1(){if(GetObj('ISL_Cont_1').scrollLeft>=GetObj('List1_1').scrollWidth){GetObj('ISL_Cont_1').scrollLeft=GetObj('ISL_Cont_1').scrollLeft-GetObj('List1_1').scrollWidth}
GetObj('ISL_Cont_1').scrollLeft+=Space_1}
function CompScr_1(){if(Comp_1==0){MoveLock_1=false;return}
var num,TempSpeed=Speed_1,TempSpace=Space_1;if(Math.abs(Comp_1)<PageWidth_1/2){TempSpace=Math.round(Math.abs(Comp_1/Space_1));if(TempSpace<1){TempSpace=1}}
if(Comp_1<0){if(Comp_1<-TempSpace){Comp_1+=TempSpace;num=TempSpace}else{num=-Comp_1;Comp_1=0}
GetObj('ISL_Cont_1').scrollLeft-=num;setTimeout('CompScr_1()',TempSpeed)}else{if(Comp_1>TempSpace){Comp_1-=TempSpace;num=TempSpace}else{num=Comp_1;Comp_1=0}
GetObj('ISL_Cont_1').scrollLeft+=num;setTimeout('CompScr_1()',TempSpeed)}}
function picrun_ini(){
GetObj("List2_1").innerHTML=GetObj("List1_1").innerHTML;
GetObj('ISL_Cont_1').scrollLeft=fill_1>=0?fill_1:GetObj('List1_1').scrollWidth-Math.abs(fill_1);
GetObj("ISL_Cont_1").onmouseover=function(){clearInterval(AutoPlayObj_1)}
GetObj("ISL_Cont_1").onmouseout=function(){AutoPlay_1()}
AutoPlay_1();
}
//产品展示滚动图片结束
//-->
</script>

</head>

<body style="font-size:12px;">
<div class="head">
	<div class="top">
		<div class="logo"><img src="images/logo.jpg" /></div>
		<div class="topmenu">
			<a href="#">关于我们</a> |
			<a href="#">加入收藏</a> |
			<a href="#">设为首页</a>
		</div>
	</div>
	<div class="menu">
	
		<div class="main">
			<ul>
				<li><a href="index.jsp">首页</a></li>
				<li><a href="aboutus.jsp">关于我们</a></li>
				<li><a href="fengcaiServlet">残友风彩</a></li>
				<li><a href="#">论坛</a></li>
				<li><a href="lovesInfo.jsp">爱心企业与个人</a></li>
				<li class="bgnone"><a href="registration.jsp">我要参与</a></li>
			</ul>
		</div>
	
	</div>
	
	<div class="banner">
		<img src="images/banner.jpg" />
	</div>
</div>

<div class="main" style="background-color:#FFFFFF">

	<div class="left">
	<%
		HomePageImageDao picNewsDao = new HomePageImageDao();
		int picNewsCount = picNewsDao.getCountOfImages();
		ArrayList picNewsList = picNewsDao.getImages(0,picNewsCount);
	 %>
		<div class="news">
			<div class="newsimg">    
				<div id="KinSlideshow" style="visibility:hidden;">
				<%
					for(int i=0,j=0;i<picNewsCount&&j<5;i++,j++){
					HomePageImage picNews = (HomePageImage)picNewsList.get(i);
				 %>
					<a href="newsShow.jsp?id=<%=picNews.getUrl() %>" target="_blank"> <img src="<%=picNews.getImage_path() %>" alt="<%=picNews.getTitle() %>" width="316" height="222" /></a>
					<%} %>
   				 </div>
			</div>
	<%
	NewsDao newsDao = new NewsDao();
	ArrayList<News> newsList = (ArrayList<News>)newsDao.getNewses(0,8);
	News news = new News();
	news = newsList.get(0);
	 	%>		
	<div class="focus">
				<h1 class="greenfont"><a href="newsShow.jsp?index=<%=0%>" target="_blank"><%=news.getTitle() %></a></h1>
				<div class="detail"><%=news.getContent().substring(0,50)%> 
				<a href="newsShow.jsp?index=<%=0%>" target="_blank">[详情]</a></div>
			</div>
			<div class="list">
				<ul>
				<%
					for(int i =1,j=0; i<newsDao.getCountOfNews() ; i++,j++){
						if(j>=6){
							break;
						}
						 news = newsList.get(i);
						 
				 %>
					<li>

					<a href="newsShow.jsp?index=<%=i%>" target="_blank" class="font14">·<%=news.getTitle() %></a><span class="fright">[<%=news.getDate().substring(0,news.getDate().indexOf(" ")) %>]</span>
					</li>
					<%} %>
				</ul>
			</div>
		</div>
	

		<div class="w714">
			
			<div class="w714 booking">
			
				<div class="tit greenfont"><strong>助创业务</strong></div>
				
			</div>
			<div class="link border">
			
				<ul>
					<li><a href="http://www.caacqq.com/" target="_blank"><img src="images/airlogo05.jpg" border="0" /></a><br />中国东方航空</li>
                    <li><a href="corporationSignIn.jsp" target="_blank"><img src="images/yewuzhaozhu.jpg" border="0" /></a><br />新业务招租</li>
                    <li><a href="corporationSignIn.jsp" target="_blank"><img src="images/yewuzhaozhu.jpg" border="0" /></a><br />新业务招租</li>
                    <li><a href=corporationSignIn.jsp target="_blank"><img src="images/yewuzhaozhu.jpg" border="0" /></a><br />新业务招租</li>
				</ul>
			
			</div>
		</div>
		
		<div class="bbs border">
		
			<div class="title greenfont"><strong>论坛栏目01</strong></div>
			<div class="first">
				<img src="images/bbsimg01.jpg" />
				<div class="h2"><a href="#" target="_blank"><strong>“风雨之路，你我同行”家长活动</strong></a><br />
			    2011年9月30日下午，深圳市希望社工服务中心“燃起希望的烛光”——关爱大病青少年项目组社工在深圳市民爱特殊 <a href="#">[详情]</a></div>
			</div>
			<ul>
				<li><a href="#" target="_blank">·关于国庆假期值班安排的通知 </a></li><span class="fright">论坛ID</span>
				<li><a href="#" target="_blank">·关于国庆假期值班安排的通知 </a></li><span class="fright">论坛ID</span>
				<li><a href="#" target="_blank">·关于国庆假期值班安排的通知 </a></li><span class="fright">论坛ID</span>
				<li><a href="#" target="_blank">·关于国庆假期值班安排的通知 </a></li><span class="fright">论坛ID</span>
				<li><a href="#" target="_blank">·关于国庆假期值班安排的通知 </a></li><span class="fright">论坛ID</span>
				<li><a href="#" target="_blank">·关于国庆假期值班安排的通知 </a></li><span class="fright">论坛ID</span>
				<li><a href="#" target="_blank">·关于国庆假期值班安排的通知 </a></li><span class="fright">论坛ID</span>
			</ul>
		</div>
		
		
		
		<div class="bbs border bbs2">
			<div class="title greenfont"><strong>论坛栏目01</strong></div>
			<div class="first">
				<img src="images/bbsimg01.jpg" />
				<div class="h2"><a href="#" target="_blank"><strong>“风雨之路，你我同行”家长活动</strong></a><br />
			    2011年9月30日下午，深圳市希望社工服务中心“燃起希望的烛光”——关爱大病青少年项目组社工在深圳市民爱特殊 <a href="#">[详情]</a></div>
			</div>
			<ul>
				<li><a href="#" target="_blank">·关于国庆假期值班安排的通知 </a></li><span class="fright">论坛ID</span>
				<li><a href="#" target="_blank">·关于国庆假期值班安排的通知 </a></li><span class="fright">论坛ID</span>
				<li><a href="#" target="_blank">·关于国庆假期值班安排的通知 </a></li><span class="fright">论坛ID</span>
				<li><a href="#" target="_blank">·关于国庆假期值班安排的通知 </a></li><span class="fright">论坛ID</span>
				<li><a href="#" target="_blank">·关于国庆假期值班安排的通知 </a></li><span class="fright">论坛ID</span>
				<li><a href="#" target="_blank">·关于国庆假期值班安排的通知 </a></li><span class="fright">论坛ID</span>
				<li><a href="#" target="_blank">·关于国庆假期值班安排的通知 </a></li><span class="fright">论坛ID</span>
			</ul>
		</div>
		
		<div class="show border">
			
			<div class="title greenfont"><strong>残友风采</strong></div>
			
			<div class="pic"><!-- picrotate_left start -->
<DIV class=blk_18><A onmouseup=ISL_StopUp_1() class=LeftBotton 
onmousedown=ISL_GoUp_1() onmouseout=ISL_StopUp_1() href="javascript:void(0);" 
target=_self></A>
<DIV class=pcont id=ISL_Cont_1>
<DIV class=ScrCont>
<DIV id=List1_1><!-- piclist begin -->
<%
		ZhuFeiUserInfoDao daouser = new ZhuFeiUserInfoDao();
		ArrayList<UserInfo>  uifoList  = daouser.getZhuFeiUserInfo(0,10,3);
		int countUser = uifoList.size();
		if(countUser>10)
			countUser = 10;
		for(int i=0;i<countUser;i++)
		{
			String url = "userPersonalInfo.jsp?username=" + uifoList.get(i).getUsername();
		 %>
		 <A class=pl 
      href="<%=url %>" target=_blank><IMG src="<%=uifoList.get(i).getAvatar_route() %>" width=156 height="104"></A>
		 <%
		 
		}
 %>

<!-- piclist end --></DIV>
<DIV id=List2_1></DIV></DIV></DIV><A onmouseup=ISL_StopDown_1() 
class=RightBotton onmousedown=ISL_GoDown_1() onmouseout=ISL_StopDown_1() 
href="javascript:void(0);" target=_self></A></DIV>
<SCRIPT type=text/javascript>
<!--
picrun_ini()
//-->
</SCRIPT>
<!-- picrotate_left end --></div>
			
			
		</div>
		
	</div>
	
	<div class="right">
	
			<div class="w224 border">
			<img src="images/user.jpg" />
			<div class="login">
			<%
				String userName = (String)session.getAttribute("username");
				if(userName==null){
			 %>
			 

			 <form action="userServlet?action=login" method="post" name="form1" onsubmit="return Juge(this)">
				<span class="input greenfont">用户名：<input type="text" size="15" name="username" style="width:120px;"/></span>
				<span class="input greenfont">&nbsp;&nbsp;密码：<input type="password"  name="password" size="15" style="width:120px;"/></span>
				<span class="input button"><input type="submit" value="登录" /><input type="button" onclick="window.open('registration.jsp')" value="免费注册" style="width:77px;"/></span>
				<a href="findPsw.jsp">忘记密码？点击这里！</a>
				</form>
				
				
				<%}else{%>
				<div style="margin-bottom:10px;">
				 <span class="input2 greenfont">欢迎您,<%=userName %></span>
			  </div>
		   <%
				 	ZhuFeiUserInfoDao userDao = new ZhuFeiUserInfoDao();
				 	UserInfo user = userDao.getZhuFeiUserInfo(userName);
				 	if(user.getReal_name().equals("0")){
				  %>
				 <div style="margin-bottom:10px;">				  
				  <span class="input2 greenfont"><a href="expandPersonalInfo.jsp" target="_blank">拓展个人资料</a></span>
 				</div>
				 <%
				 }else{%>
				 <div style="margin-bottom:10px;">
				 <span class="input2 greenfont"><a href="userServlet?action=edit" target="_blank">修改个人资料</a></span>
				 </div>
				<%} 
				%>
				<div style="margin-bottom:10px;">
				 <span class="input2 greenfont"><a href="logout.jsp">退出</a></span>	
				 </div>	
				<%}%>
			</div>
		</div>
		
		
		
		<div class="w224 border" style="margin-top:8px;">
			<img src="images/aixin.jpg" width="224" height="27" />	
			<%
			   	   ArrayList<Sponsor> frontSponsor =SponsorDao.getSponsors(0,20);
			 				
			 %>			
			<div class="aixin">
				<%int count = frontSponsor.size(); 
				if(count>20)
				{
					count = 20;
				}
				for(int i=0;i<count;i++){
					%>
					·<%=frontSponsor.get(i).getName() %>（救助<%=frontSponsor.get(i).getHandicapped() %>爱心接力)</br>
					<%
				}
				%>
			</div>
		</div>

<div class="w224 border" style="margin-top:8px;">
			<img src="images/videotit.jpg" width="224" height="27" />	
			<div class="video">
			<%
				Video v = VideoDao.getVideo();
	 		%>
	 		<%=v.getHtml() %>
					</div>
		</div>
		
	</div>
	<div class="sitelink">
		<div class="sltit greenfont">
				<strong>友情链接</strong>
		</div>
		<ul>
			<li><a href="http://www.sz.gov.cn/cn/" target="_blank">深圳市市政府</a></li>
			<li><a href="http://www.szmz.sz.gov.cn/" target="_blank">深圳市民政在线</a></li>
		</ul>
	</div>
</div>
<div class="clear"></div>
<div class="footer">
	<p>深圳市橄榄树助飞基金<br>
	地址：深圳市罗湖区宝安南路3097号洪涛大厦四楼<br>
	电话：0755-25595903、25590786 传真：25595900<br>
	Copyright &copy; 2011 www.glszhufei.com , All Rights Reserved.
    </p>
	<p><a href="adminLogin.jsp" target="_blank">管理员入口</a></p>
</div>

</body>
</html>
